package com.gitee.jmliu1983.finacehelper.service.impl;

import java.util.List;
//import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gitee.jmliu1983.finacehelper.mapper.NvFundOpenFundInfoEmMapper;
import com.gitee.jmliu1983.finacehelper.domain.NvFundOpenFundInfoEm;
import com.gitee.jmliu1983.finacehelper.service.INvFundOpenFundInfoEmService;
import com.ruoyi.common.utils.DateUtils;

/**
 * 每日基金净值Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-25
 */
@Service
public class NvFundOpenFundInfoEmServiceImpl implements INvFundOpenFundInfoEmService 
{
    @Autowired
    private NvFundOpenFundInfoEmMapper nvFundOpenFundInfoEmMapper;

    /**
     * 查询每日基金净值
     * 
     * @param id 每日基金净值主键
     * @return 每日基金净值
     */
    @Override
    public NvFundOpenFundInfoEm selectNvFundOpenFundInfoEmById(Long id)
    {
        return nvFundOpenFundInfoEmMapper.selectNvFundOpenFundInfoEmById(id);
    }

    /**
     * 查询每日基金净值列表
     * 
     * @param nvFundOpenFundInfoEm 每日基金净值
     * @return 每日基金净值
     */
    @Override
    public List<NvFundOpenFundInfoEm> selectNvFundOpenFundInfoEmList(NvFundOpenFundInfoEm nvFundOpenFundInfoEm)
    {
        return nvFundOpenFundInfoEmMapper.selectNvFundOpenFundInfoEmList(nvFundOpenFundInfoEm);
    }

    /**
     * 新增每日基金净值
     * 
     * @param nvFundOpenFundInfoEm 每日基金净值
     * @return 结果
     */
    @Override
    public int insertNvFundOpenFundInfoEm(NvFundOpenFundInfoEm nvFundOpenFundInfoEm)
    {
        nvFundOpenFundInfoEm.setCreateTime(DateUtils.getNowDate());
        return nvFundOpenFundInfoEmMapper.insertNvFundOpenFundInfoEm(nvFundOpenFundInfoEm);
    }

    /**
     * 修改每日基金净值
     * 
     * @param nvFundOpenFundInfoEm 每日基金净值
     * @return 结果
     */
    @Override
    public int updateNvFundOpenFundInfoEm(NvFundOpenFundInfoEm nvFundOpenFundInfoEm)
    {
        nvFundOpenFundInfoEm.setUpdateTime(DateUtils.getNowDate());
        return nvFundOpenFundInfoEmMapper.updateNvFundOpenFundInfoEm(nvFundOpenFundInfoEm);
    }

    /**
     * 批量删除每日基金净值
     * 
     * @param ids 需要删除的每日基金净值主键
     * @return 结果
     */
    @Override
    public int deleteNvFundOpenFundInfoEmByIds(Long[] ids)
    {
        return nvFundOpenFundInfoEmMapper.deleteNvFundOpenFundInfoEmByIds(ids);
    }

    /**
     * 删除每日基金净值信息
     * 
     * @param id 每日基金净值主键
     * @return 结果
     */
    @Override
    public int deleteNvFundOpenFundInfoEmById(Long id)
    {
        return nvFundOpenFundInfoEmMapper.deleteNvFundOpenFundInfoEmById(id);
    }
}
